<template>
  <div>
    <el-menu :default-openeds="['1', '3']" style="height: 100%;overflow-x: hidden"
             background-color="rgb(48,65,86)"
             text-color="#fff"
             active-text-color="red"
             :collapse-transition="false"
             :collapse="isCollapse"
             router>
      <div style="height: 60px;line-height: 60px;text-align: center">
        <img src="../assets/img.png" alt="" style="height: 20px;position: relative; top: 5px;margin-right: 5px">
        <b style="color:white" v-show="isTextShow">共享充电宝</b>
      </div>


      <el-menu-item index="/userPage">
        <template slot="title">
          <i class="el-icon-house"></i>
          <span slot="title">主页</span>
        </template>
      </el-menu-item>
      <el-submenu index="2">
        <template slot="title"><i class="el-icon-menu"></i>
          <span slot="title">用户功能</span>
        </template>
        <el-menu-item index="/userPbPage" >
          <i class="el-icon-shopping-bag-1"></i>
          充电宝租借
        </el-menu-item>
        <el-menu-item index="/userMap" >
          <i class="el-icon-map-location" style="color: #42b983"></i>
          查找附近投放点位置
        </el-menu-item>
        <el-menu-item index="/bindIdCard" >
          <i class="el-icon-bank-card"></i>
          身份绑定
        </el-menu-item>
        <el-menu-item index="/orderNow" >
          <i class="el-icon-shopping-cart-full"></i>
         正在进行的订单
        </el-menu-item>

        <el-menu-item index="/orderhistory" >
          <i class="el-icon-document"></i>
          历史订单
        </el-menu-item>


        <el-menu-item index="/recharge" >
          <i class="el-icon-s-goods">
          </i>
          <span>余额：{{user.account}}</span>

        </el-menu-item>





      </el-submenu>
    </el-menu>
  </div>
</template>

<script>

export default {
  name:"UserAside",
  props:{
    isCollapse:Boolean,
    isTextShow:Boolean
  },
  data(){
    return{
      user: localStorage.getItem("user")?JSON.parse(localStorage.getItem("user")):{}
    }
  }
}

</script>